﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Tanmia.Warehouse.Core;
using FluentNHibernate.Mapping;

namespace Tanmia.Warehouse.NHibernateRepository.Mapping
{
    public class UnitMap : ClassMap<Unit>
    {
        public UnitMap()
        {
            Table("Unit");

            Id(x => x.UnitID).GeneratedBy.Identity().Unique();
            Map(x => x.UnitName).Length(50).Not.Nullable();
            Map(x => x.Abbreviation).Length(50);
        }
    }
}
